-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for gjs and gts #9940
feat: add support for gjs and gts #9940
Conversation
(call_expression | ||
function: ((identifier) @_name | ||
(#eq? @_name "hbs")) | ||
arguments: ((template_string) @glimmer | ||
(#offset! @glimmer 0 1 0 -1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support #offset!
. This will also need to be updated to use injection.content
and injection.language
rather than tagging with @glimmer
- that's the way nvim-treesitter did injections in the past.
Something like
(call_expression
function: ((identifier) @_name
(#eq? @_name "hbs"))
arguments: ((template_string) @injection.content
(#set! injection.language "glimmer")))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably just be dropped due to RFC 0779
As of [RFC 0779][rfc-0779], we decided on
<template>
overhbs
; see the RFC for the full rationale.Thehbs
format is still technically supported by this repo for transition purposes for the early adopters who helped us get here, but will be removed at some point in the near future!hbs
has been removed -- if you rely on this feature, please useember-template-imports @ < v4
, until migrated to<template>
If anywhere this probably belongs into the javascript/typescript injections instead of gjs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's drop this pattern. It won't do anything in its current form anyways because of the @glimmer
capture
9152270
to
cc0db28
Compare
3ed6534
to
2c53bd6
Compare
2c53bd6
to
8623c83
Compare
0b225a5
to
ef17c6d
Compare
ef17c6d
to
50ca271
Compare
It is great we are finally getting a config for You config seems cool, my only question is should we use https://eslint.org/blog/2022/08/new-config-system-part-2/ Is FlatConfig not the current standard? Typescript ESlint seems to use it and describes the old one as legacy: https://typescript-eslint.io/getting-started/ Forgive my ignorance on this topic, I thought I would bring it up but don't really have any answers, only questions. Perhaps @Philipp-M could comment? |
AFAIK eslint is almost always used within Ember ships with eslint per default: app blueprint Using eslint-plugin-ember is the only way i found to get useful diagnostics For reference, using
I just contributed my local config upstream, therefore theres things such as [language-server.eslint.config]
experimental = { useFlatConfig = false } If there is something like "per language" LSP configurations it would probably make sense to not configure this for other languages. |
I think each LSP config is universal in Helix. We should probably use the equivalent of the Neovim config for eslint: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#eslint . It looks almost the same as the one in this PR, they also have
My understanding is that codeActionOnSave does not work in Helix at this point, but do we want to explicitly turn it off like Neovim? |
50ca271
to
e6ad12f
Compare
e6ad12f
to
aed7c81
Compare
Add support for glimmer-js and glimmer-ts
gjs
gts
(error due to using linguist sample and missing imports)